angular go to route

63

angular go to route -

import {Router} from '@angular/router';

constructor(private router: Router) {}

navigateToLogin() {
   this.router.navigateByUrl('/login');
}

generate module with routing in angular -

ng g m [ModuleName] --routing

Comments

Submit
0 Comments